import http from '../utils/http/http.js'

//获取项目
export const project = (code) =>
  http.get(`/produce/project-plot/farmer-projects`)
//根据项目id去查对应的方案
export const projectItemInfo = (projectId, pageNo, pageSize) =>
  http.get(
    `/produce/projectPlotTask/farmer-tasks-with-project-info?projectId=${projectId}&pageNo=${pageNo}&pageSize=${pageSize}`
  )
//根据任务id和方案id去查对应的方案
export const planItemInfo = (id, taskSchemeId) =>
  http.get(`/produce/task-scheme/get?ptId=${id}&id=${taskSchemeId}`)
// //查询所有的物料名称
export const materialList = () => http.get(`/produce/material/simple-list`)
export const allPlanData = () => {
  return http.all(project())
}
